package cn.huaqingcheng.tianshu.core.uc.repository;

import cn.huaqingcheng.tianshu.core.uc.model.AccountKeyValue;
import cn.huaqingcheng.tianshu.core.uc.model.AccountSettingKey;

import java.util.Optional;

/**
 * AccountKeyValueRepository
 */
public interface AccountKeyValueRepository {

    AccountKeyValue save(AccountKeyValue value);

    AccountKeyValue updateById(AccountKeyValue value);

    AccountKeyValue updateByKey(AccountKeyValue value, AccountSettingKey key);

    Optional<AccountKeyValue> selectById(Long id);

    Optional<AccountKeyValue> selectByKey(AccountSettingKey key, Long accountId);

}
